package com.cntcdt.api.service.impl;

import java.util.List;

import com.cntcdt.api.db.dao.AddLineUserDeviceDao;
import com.cntcdt.api.db.model.AddLineUserDeviceModel;
import com.cntcdt.api.service.AddLineUserDeviceService;

public class AddLineUserDeviceServiceImpl implements AddLineUserDeviceService {

	@Override
	public List<AddLineUserDeviceModel> findByUserId(int userId) {
		return AddLineUserDeviceDao.getInstance().findByUserId(userId);
	}

	@Override
	public List<AddLineUserDeviceModel> findByUserIdAndSortTime(int userId, int sortTime) {
		return AddLineUserDeviceDao.getInstance().findByUserIdAndSortTime(userId, sortTime);
	}

	@Override
	public int insertModel(AddLineUserDeviceModel addLineUserDevice) {
		return AddLineUserDeviceDao.getInstance().insert(addLineUserDevice);
	}

	@Override
	public AddLineUserDeviceModel findByUserIdAndTerminal(int userId, String terminal) {
		return AddLineUserDeviceDao.getInstance().findByUserIdAndTerminal(userId, terminal);
	}

	@Override
	public AddLineUserDeviceModel findById(int addLineUserDeviceId) {
		return AddLineUserDeviceDao.getInstance().findByPrimaryKey(addLineUserDeviceId);
	}

	@Override
	public boolean updateModel(AddLineUserDeviceModel addLineUserDevice) {
		return AddLineUserDeviceDao.getInstance().update(addLineUserDevice);
	}

	@Override
	public List<AddLineUserDeviceModel> findByTerminal(String terminal) {
		return AddLineUserDeviceDao.getInstance().findByTerminal(terminal);
	}

	@Override
	public AddLineUserDeviceModel findByGroupIdAndTerminal(int groupId, String terminal) {
		// TODO Auto-generated method stub
		return AddLineUserDeviceDao.getInstance().findByGroupIdAndTerminal(groupId, terminal);
	}

	@Override
	public List<AddLineUserDeviceModel> findByTerminalAndType(String terminal) {
		// TODO Auto-generated method stub
		return AddLineUserDeviceDao.getInstance().findByTerminalAndType(terminal);
	}

	@Override
	public List<AddLineUserDeviceModel> findByTerminalAndAdminUserGroupId(String terminal, int adminUserGroupId) {
		// TODO Auto-generated method stub
		return AddLineUserDeviceDao.getInstance().findByTerminalAndAdminUserGroupId(terminal, adminUserGroupId);
	}

	@Override
	public boolean isExistRecord(String terminal) {
		// TODO Auto-generated method stub
		return AddLineUserDeviceDao.getInstance().isExistRecord(terminal);
	}

}
